projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1551401
)
Don't crash on NULL parent
author
Alexander Larsson
<alexl@redhat.com>
Mon, 17 Aug 2009 14:59:47 +0000
(16:59 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Mon, 17 Aug 2009 14:59:47 +0000
(16:59 +0200)
The parent window can be NULL, check for that before dereferencing.
gdk/gdkwindow.c
patch
|
blob
|
history
diff --git
a/gdk/gdkwindow.c
b/gdk/gdkwindow.c
index b9d0bfff6dcde6c97b48e6a915d6c810bcbe3950..87066087d7c215a92238a5477fd2dbb044a41bfa 100644
(file)
--- a/
gdk/gdkwindow.c
+++ b/
gdk/gdkwindow.c
@@
-7295,7
+7295,7
@@
gdk_window_get_geometry (GdkWindow *window,
/* This reports the position wrt to the native parent, we need to convert
it to be relative to the client side parent */
parent = private->parent;
- if (!gdk_window_has_impl (parent))
+ if (
parent &&
!gdk_window_has_impl (parent))
{
*x -= parent->abs_x;
*y -= parent->abs_y;